package com.leetcode.题库;

import com.leetcode.common.model.TreeNode;

/**
 * @author 覃国强
 * @date 2022-04-11 19:59
 */
public class 题库_0104_二叉树的最大深度 {

  static
  class Solution {
    public int maxDepth(TreeNode root) {
      return root == null ? 0 : Math.max(maxDepth(root.left), maxDepth(root.right)) + 1;
    }
  }

}
